<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-3-31
 * Time: 15:36
 */
class Dad{

    public function __construct()
    {
        echo 'dad init......';
    }

    protected function Kungfu(){
        echo '123456789';
    }

}
class Boy extends Dad{

    public function __construct()
    {
        parent::__construct();
        echo 'boy init......';
    }

    public function run(){
        $this->Kungfu();
    }
}

$doy =new Boy();
$doy->run();